#!/bin/bash
currDir=`pwd`
courseName=`basename ${currDir}`
echo -e "<html>\n  <head>\n    <title>${courseName}</title>\n</head>\n   <body>\n     <h1>Table of Contents</h1>\n     <p style="text-indent:0pt">\n" > index.html
ls html | awk -F ".html" '{print "<a href=\""$0"\">"$1"</a><br/>"}' >> index.html

echo -e "     </p>\n   </body>\n</html>\n"  >> index.html
# ebook-convert index.html new.epub --flow-size 2000000